/* 设备管理-设备维护（员工）api */

import { ajaxService } from '@/utils/request';

const env = import.meta.env;
let baseURL = env.VITE_EQUIPMENT_URL;
// let baseURL = 'http://192.168.0.120:8086';

// 获取维修列表数据
export function GetEmployeeRepairList(params: any) {
  return ajaxService({
    url: '/equipment/maintain/user/repair/list',
    method: 'get',
    baseURL,
    params,
  });
}

// 编辑设备维修单
export function PutEmployeeFaultEquipment(data: any) {
  return ajaxService({
    url: '/equipment/maintain/repair/list/edit',
    method: 'put',
    baseURL,
    data,
  });
}

// 删除设备维修单
export function DelEmployeeFaultEquipment(params: any) {
  return ajaxService({
    url: '/equipment/maintain/repair/list',
    method: 'delete',
    baseURL,
    params,
  });
}

// 获取保养列表数据
export function GetEmployeeMaintenanceList(params: any) {
  return ajaxService({
    url: '/equipment/maintain/user/maintenance/list',
    method: 'get',
    baseURL,
    params,
  });
}

// 开始保养或者编辑保养列表
export function PutEmployeeMaintenanceList(data: any) {
  return ajaxService({
    url: '/equipment/maintain/repair/maintenance/list',
    method: 'put',
    baseURL,
    data,
  });
}

// 删除保养列表
export function DelMaintenanceEquipment(params: any) {
  return ajaxService({
    url: '/equipment/maintain/repair/maintenance/list',
    method: 'delete',
    baseURL,
    params,
  });
}
